/**
 * Package:com.goldcitynet.engine.service.impl;
 * $Id$
 * Copyright(c) 2001-2005 www.afteryuan.com
 */
package com.afteryuan.engine.service.impl;

import com.afteryuan.dao.HibernateEntityDao;
import com.afteryuan.engine.model.UserCartoon;
import com.afteryuan.engine.service.UserCartoonService;

import java.util.List;

/**
 * UserCartoonServiceImpl
 * <p/>
 * <p><a href="UserCartoonServiceImpl.java.html"><i>View Source</i></a></p>
 *
 * @author <a href="mailto:afteryuan@afteryuan.com">$Author$</a>
 * @version $Revision$
 */
public class UserCartoonServiceImpl extends HibernateEntityDao<UserCartoon> implements UserCartoonService {


    public UserCartoon getByUserId(String userId) {
        String hql="from UserCartoon where userId='"+userId+"'";
        List<UserCartoon> l =createList(hql);
        if(l==null || l.size()!=1)return null;
        return l.get(0);
    }
}
